import request from "@/utils/request";
import { userAddData,userData } from "@/type/api";

export const alipay = (data:{id:string,mail:string}) => {
    return request.post('/alipay',data)
}

export const isAlipay = (data: any) => {
    return request.post('/isAlipay', data)
}

//添加数据
export const addData = (data: userAddData) => {
    return request.post('/addData', data)
}

//获取推荐数据
export const getData = () => {
    return request.get('/getData')
}

//获取随机数据
export const getSimpleData = () => {
    return request.get('/getSimpleData')
}

//详情页面数据
export const getIdData = (data:{_id:string}) => {
    return request.post('/getIdData',data)
}

//任务大厅全部数据
export const getFindData = () => {
    return request.post('/getFindData')
}

//获取验证码
export const getUserData = (data:userData) => {
    return request.post('/getUserData',data)
}

//发送验证码
export const getUserCode = (data:userData) => {
    return request.post('/getUserCode',data)
}

//登录
export const login = (data:{mail:string,password:string}) => {
    return request.post('/login',data)
}

//用户数据
export const user = (data:{mail:string}) => {
    return request.post('/user',data)
}

//用户单子数据
export const userDataSepmt = (data:{mail:string}) => {
    return request.post('/userDataSepmt',data)
}

//用户接单
export const userOrder = (data:{mail:string,id:string}) => {
    return request.post('/userOrder',data)
}

//用户接单数量
export const userOrderNum = (data:{id:string}) => {
    return request.post('/userOrderNum',data)
}
//检查用户是否接取此单
export const ifUserOrder = (data:{mail:string,id:string}) => {
    return request.post('/ifUserOrder',data)
}
//用户联系方式
export const ifUserPhone = (data:{id:string}) => {
    return request.post('/ifUserPhone',data)
}

//用户发布的贴子
export const userSepmt = (data:{mail:string}) => {
    return request.post('/userSepmt',data)
}
//用户接取订单数量
export const userjiequnum = (data:{mail:string}) => {
    return request.post('/userjiequnum',data)
}
//用户接取订单数据
export const userJQSepmt = (data:{mail:string}) => {
    return request.post('/userJQSepmt',data)
}
//用户接取订单数据
export const searchData = (data:{input:string,input2:string}) => {
    return request.post('/searchData',data)
}
//检测是否vip
export const isVipUser = (data:{id:string}) => {
    return request.post('/isVipUser',data)
}
//获取全部FB账号
export const getFB = () => {
    return request.post('/getFB')
}
//发送账号交易订单
export const alipayFB = (data:{id:string,money:string,data:string}) => {
    return request.post('/alipayFB',data)
}
//支付成功
export const isAlipayFB = (data: any) => {
    return request.post('/isAlipayFB', data)
}